package com.zhuss.controller.car;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.zhuss.bean.bo.car.driver.DetailDriverBo;
import com.zhuss.bean.bo.car.driver.SearchDriverBo;
import com.zhuss.common.BaseController;
import com.zhuss.common.ReadService;
import com.zhuss.car.driver.DriverReadServiceExt;
import com.zhuss.exception.DzcxException;


/**
 * @description: 司机查询Controller
 * @author: zhushanshuo
 * @create: Mon Dec 21 13:31:45 CST 2020
 **/
@RestController
@RequestMapping("/driver")
public class DriverReadController extends BaseController {
	
	@Autowired
	@Qualifier("driverReadService")
	private ReadService<Object, Object> driverReadService;
	
	@Autowired
	@Qualifier("driverReadServiceExt")
	private DriverReadServiceExt driverReadServiceExt;
	
	/**
	 * 详情
	 * @param bo
	 * @return
	 * @throws DzcxException
	 */
	@ResponseBody
	@RequestMapping("/detail")
    public Object detail(@RequestBody DetailDriverBo bo) throws DzcxException {
		
		Object result = driverReadService.detail(bo);
		return result;
    }
	
	/**
	 * 列表
	 * @param bo
	 * @return
	 * @throws DzcxException
	 */
	@ResponseBody
    @RequestMapping("/list")
    public Object list(@RequestBody SearchDriverBo bo) throws DzcxException {
		
		Object result = driverReadService.list(bo);
		return result;
    }
	
}
